import Taro from '@tarojs/taro'
import { Block, View,Navigator ,Image ,Text} from '@tarojs/components'
import 'taro-ui/dist/style/components/grid.scss'
import { AtGrid } from 'taro-ui'
import { UserCenterHeader } from '../UserCenterHeader'

import '../GovTemp/index.less'
import './index.less'

function PeopleTemp(props) {

  function navigatorTo(e) {
    console.log(e);
    const { url } = e
    Taro.navigateTo({
      url
    })

  }
  return (
    <Block>
      {/** 头像 */}
      <UserCenterHeader userInfo={props.userInfo} myUnitList={props.myUnitList}></UserCenterHeader>
      {/** 菜单项 */}
      <Block>
        <View className='grid-contain bg_1883C9'>
          <AtGrid
            onClick={navigatorTo}
            columnNum={4}
            hasBorder={false}
            data={
              [{
                image: require('../../../../assets/images/svg/me_item_3.svg'),
                value: '我的活动',
                url: '/subs/usercenter/interactive/pages/activity/activity'
              },
              {
                image: require('../../../../assets/images/svg/me_item_11.svg'),
                value: '微事我言',
                url: '/subs/usercenter/interactive/pages/say/say'
              },
              {
                image: require('../../../../assets/images/svg/me_item_10.svg'),
                value: '我的街道',
                url: '/subs/instruction/pages/user-list/user-list'
              },
              {
                image: require('../../../../assets/images/svg/me_item_9.svg'),
                value: '红包卡券',
                url: '/subs/welfare/pages/card-coupon/card-coupon'
              },]}
          />
        </View>
      </Block>
      {/** 菜单项 */}
      <View className='options-group'>
        <View className='options-list'>
          <Navigator url='/pages/load/load?stay=1' className='item'>
            <View>
              <Image
                className='icon'
                src='http://resource.aijiatui.com/ai-img/mini-program/mini-all/usercenter/cards.png'
              ></Image>
              <Text className='label'>名片夹</Text>
              <Text className='iconfont icon-gerenziliaojiantou'></Text>
            </View>
          </Navigator>
        </View>
        <View className='options-list'>
          <Navigator
            url='/subs/usercenter/settings/pages/userinfo/userinfo'
            className='item'
          >
            <View>
              <Image
                className='icon'
                src='http://resource.aijiatui.com/ai-img/mini-program/mini-all/usercenter/setting.png'
              ></Image>
              <Text className='label'>设置</Text>
              <Text className='iconfont icon-gerenziliaojiantou'></Text>
            </View>
          </Navigator>
        </View>
      </View>



    </Block>
  )
}

export { PeopleTemp }